package com.zhuimeng.filter;

import org.apache.dubbo.common.threadlocal.InternalThreadLocal;

public class IPContext {
    private static InternalThreadLocal<IPContext> IP_CONTEXT = new InternalThreadLocal<IPContext>(){
        protected IPContext initialValue() {
            return new IPContext();
        }
    };

    private String clientIp;

    public static IPContext getContext() {
        return IP_CONTEXT.get();
    }

    public String getClientIp() {
        return clientIp;
    }

    public void setClientIp(String clientIp) {
        this.clientIp = clientIp;
    }
}
